package com.behome.netty.netty_B.enums;


import com.behome.netty.common.ByteConventerKit;
import lombok.Getter;

@Getter
public enum ReBackCmdType {
    UNKNOWN((byte) 0, "未知"),
    HEART_BEAT((byte) 0x10, "终端心跳"),
    QUERY_RESPONSE((byte) 0x11, "查询指令应答"),
    FAULT_RECOVER((byte) 0x13, "故障与恢复指令"),
    TASK_SWITCH((byte) 0x14, "任务切换指令"),
    BROADCAST_RESULT((byte) 0x15, "上报播发结果"),
    BROADCAST_RECORDS((byte) 0x16, "上报播发记录"),
    COMMON_RESP((byte) 103, "一般应答");

    private byte value;
    private String name;

    private ReBackCmdType(byte value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public String toString() {
        return this.name + "[" + ByteConventerKit.byteToHexStr(this.value, true, true) + "]";
    }
}
